Smarty Example Tutorial (1)
One, what is Smarty?
Smarty is a template php template engine written using PHP, it provides a separation of logic and external content, simply, the purpose is to use PHP programmers with the United States Gongfen
Away,
The application of smarty variable and variable modifier is described in this paper. Share to everyone for your reference. Specifically as follows:
Template file: temp.htm:
Copy Code code as follows:
{config_load file= "foo.conf"}
First, the wordingGenerally need the following: Write 3 pages:1. Display Page aa.htmlDOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd ">HTMLxmlns=
PHP template engine Smarty built-in variable mediator usage detailed, template Smarty
This example describes the PHP template engine Smarty built-in variable mediator usage. Share to everyone for your reference, as follows:
The variable mediator in
In order to separate the business logic of the program from the content presentation page and improve the development speed, php introduces the template engine concept. The most popular php template engine is smarty, smarty is recognized by PHP Web
Common Simple Application Analysis of Smarty templates and smarty Application Analysis
This document analyzes common simple applications of Smarty templates. We will share this with you for your reference. The details are as follows:
First, you must
How the smarty template is executed. To enable separation of the business logic and content presentation page of the program, php introduces the template engine concept, the most popular php template engine is smarty, which introduces the template
The simple application of smarty template is analyzed in this paper. Share to everyone for your reference, specific as follows:
First you include the Smarty class:
Include_once '.. /libs/smarty.class.php ';
Then create a Smarty
Background isolation, front desk control display, background control content, similar to the CMS principle: User access text.php backstage, background call class smarty.class.php display static template; involves a temporary file a cache file; The
1. using smarty1.1 Project Introduction 3, connect the database, extract the relevant data$title = "Smarty template engine";$content = "Smarty template engine is one of the most used template engines in the industry today";4, instantiating the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.